Classification of pore or grain types in formation samples from a subterranean formation

ABSTRACT

A method is provided for automatically classifying grains, pores, or both of a formation sample. The method includes receiving a digital image representation of the formation sample, and identifying a plurality of pores, grains, or both in the digital image representation. The method also includes computing a plurality of geometric features associated with the pores, grains, or both in the digital image representation, and inputting the geometric features into an unsupervised machine learning model. The unsupervised machine learning model determines a label for each identified pore and grain, the label being a pore-type or a grain-type, and the plurality of geometric features and the labels determined for each pore, grain, or both, are input into a supervised machine learning model. The supervised machine learning model determines a final classification of a pore-type for each pore and a grain-type for each grain in the digital image representation of the formation sample.

TECHNICAL FIELD

The present disclosure relates generally to evaluation of formationsamples from a subterranean formation and, more particularly, toautomatic classification of pore or grain types in formation samplesfrom a subterranean formation.

BACKGROUND

Wellbores, such as those used in oil and gas extraction, are typicallydrilled into a geologic formation in a believed hydrocarbon bearingzone. However, the wellbore typically passes through several differentformation types as it descends into the formation. Evaluation of therock formations surrounding the wellbore allow for the most effectiveextraction locations to be selected. Typically, the formationssurrounding the wellbore are evaluated using a petrophysical analysis ofa formation sample to identify a specific rock type or the types ofpores or grains in the rock. Such formation samples can be obtainedduring the drilling process or through the use of wireline tools.Specifically, the geologic formation sample can be scanned and displayedas an image and then sections of the geologic formation sample can beclassified qualitatively by a geologist visually inspecting theimage(s). The classification consists of labelling each pore or grainvisible in the image with a certain type, where the type is defined inthe geology literature and may contain sub-types or be aggregated insuper-types, depending on the scale of the rock image. This process of ageologist manually labelling pore types and grain types is a laboriousprocess that may be doable for thin sections, or single 2D images, butbecomes extremely complicated for whole 3D volumes potentiallyconsisting of hundreds of images. Furthermore, there are inconsistenciesbetween the qualitative evaluation of pore types and grain typesperformed by individual geologists, meaning that two geologists lookingat the same rock image may classify the pore types and/or grain types ofthe rock differently. This may call into question the accuracy of poreand grain type classifications, and the resulting determination of anexpected production throughput of the formation from which the rock wasextracted.

BRIEF DESCRIPTION OF THE DRAWINGS

Some specific exemplary aspects of the disclosure may be understood byreferring, in part, to the following description and the accompanyingdrawings.

FIG. 1A is a schematic diagram of an exemplary drilling environmentcompatible with systems and methods in accordance with one or moreaspects of the present disclosure;

FIG. 1B is a schematic diagram of an exemplary conveyance wellboreenvironment compatible with systems and methods in accordance with oneor more aspects of the present disclosure;

FIG. 1C is a schematic diagram of a system for formation sampleretrieval and scanning analysis of a retrieved formation sample, inaccordance with one or more aspects of the present disclosure;

FIG. 2 is a process flow diagram of a method for classifying pore andgrain types of a formation sample, in accordance with one or moreaspects of the present disclosure;

FIG. 3 is a screenshot of an exemplary 2D image of a formation sample,in accordance with one or more aspects of the present disclosure;

FIG. 4 is a perspective view of an exemplary 3D volume of a formationsample, in accordance with one or more aspects of the presentdisclosure;

FIG. 5 is a schematic diagram of an exemplary pore or grain visible inan image of a formation sample and showing various geometric featuresassociated with the pore or grain, in accordance with one or moreaspects of the present disclosure; and

FIG. 6 is a screenshot of an exemplary 2D image of a formation sampleoverlaid with labels for different pore types or grain types, inaccordance with one or more aspects of the present disclosure.

While aspects of this disclosure have been depicted and described andare defined by reference to exemplary aspects of the disclosure, suchreferences do not imply a limitation on the disclosure, and no suchlimitation is to be inferred. The subject matter disclosed is capable ofconsiderable modification, alteration, and equivalents in form andfunction, as will occur to those skilled in the pertinent art and havingthe benefit of this disclosure. The depicted and described aspects ofthis disclosure are examples only, and not exhaustive of the scope ofthe disclosure.

DESCRIPTION OF CERTAIN EMBODIMENTS

The present application relates to a method, system, and non-transitorycomputer-readable medium to automatically classify pore or grain typeson images of one or more formation samples taken from a subterraneanformation. The images may be computer-tomograph (CT) images, or a 2Dwhite light photograph, of scanned formation sample(s). The term “pore”in this context represent an empty space inside the rock sample, whilethe term “grain” represents a solid grain of the rock. Examples of poretypes may include those listed in the Choquette & Pray (1970) pore typeclassification system, or whether a primary or secondary pore containsor lacks organic matter. Quantifying the potential to have organicmatter deposited inside the pore helps in turn to define the oil and gasproduction potential throughput of the formation from which the rock wasextracted.

The present disclosure relates to a software method, e.g., an algorithm,for 2D or 3D pore and/or grain type classification on a digital rockimage scanned by a CT scanner or other imaging device at any scale. Themethod includes two techniques that are not apparently related to poresand rocks in images or volumes. The first technique is of a geometricnature and includes computing various geometric features of the poresand/or grains visible in the rock sample. The second technique involvestraining a machine-learning model to learn, based on all the geometricfeatures computed by the first technique, how to classify the pore typefor each pore and/or the grain type for each grain. The machine learningmodel may be a combination of unsupervised and supervised models, mayinclude manual features or labels determined in previous images by oneor more geologists, and may also include automatic features or labelscomputed by the first technique.

By the appropriate and orchestrated use of the geometric features,labels, and techniques described above, it is possible to classify poretypes and/or grain types automatically, providing a high quality,accurate, consistent, and fast method for formation classification.

For purposes of this disclosure, an information handling system mayinclude any instrumentality or aggregate of instrumentalities operableto compute, classify, process, transmit, receive, retrieve, originate,switch, store, display, manifest, detect, record, reproduce, handle, orutilize any form of information, intelligence, or data for business,scientific, control, or other purposes. For example, an informationhandling system may be a personal computer, a network storage device, orany other suitable device and may vary in size, shape, performance,functionality, and price. The information handling system may includerandom access memory (RAM), one or more processing resources such as acentral processing unit (CPU) or hardware or software control logic,ROM, and/or other types of nonvolatile memory. Additional components ofthe information handling system may include one or more disk drives, oneor more network ports for communication with external devices as well asvarious input and output (I/O) devices, such as a keyboard, a mouse, anda video display. The information handling system may also include one ormore buses operable to transmit communications between the varioushardware components. It may also include one or more interface unitscapable of transmitting one or more signals to a controller, actuator,or like device.

For the purposes of this disclosure, computer-readable media may includeany instrumentality or aggregation of instrumentalities that may retaindata and/or instructions for a period of time. Computer-readable mediamay include, for example, without limitation, storage media such as adirect access storage device (for example, a hard disk drive or floppydisk drive), a sequential access storage device (for example, a tapedisk drive), compact disk, CD-ROM, DVD, RAM, ROM, electrically erasableprogrammable read-only memory (EEPROM), and/or flash memory; as well ascommunications media such as wires, optical fibers, microwaves, radiowaves, and other electromagnetic and/or optical carriers; and/or anycombination of the foregoing.

Illustrative aspects of the present disclosure are described in detailherein. In the interest of clarity, not all features of an actualimplementation may be described in this specification. It will of coursebe appreciated that in the development of any such actual aspect,numerous implementation specific decisions are made to achieve thespecific implementation goals, which will vary from one implementationto another. Moreover, it will be appreciated that such a developmenteffort might be complex and time-consuming, but would, nevertheless, bea routine undertaking for those of ordinary skill in the art having thebenefit of the present disclosure.

Turning now to the drawings, FIGS. 1A, 1B, and 1C illustrate exemplaryenvironments compatible with the disclosed systems and methods. Forexample, FIG. 1A illustrates a schematic view of an exemplary loggingwhile drilling (LWD) and/or measurement while drilling (MWD) wellboresystem 110 which can be used to create a wellbore and gather geologicformation samples for rock formation analysis. As depicted in FIG. 1A, adrilling platform 111 is equipped with a derrick 112 that supports ahoist 113 for raising and lowering a drill string 114. The hoist 113 maysuspend a top drive 115 suitable for rotating the drill string 114 andlowering the drill string 114 through the well head 116. Connected tothe lower end of the drill string 113 is a drill bit 117. As the drillbit 117 rotates, the drill bit 117 creates a wellbore 118 that passesthrough various formations 119. The drill string 114 can also include asampling-while-drilling tool, operable to collect geologic formationsamples of the various formations through which the drill passes forretrieval at the surface. In an alternative embodiment, analysis can beperformed on drill cuttings retrieved at the surface of the wellbore.The wellbore 118 can be formed according to a desired well plan havingone or more vertical, curved, and/or horizontal portions extendingthrough one or more formations 119. A pump 120 circulates drilling fluidthrough a supply pipe 121 to top drive 115, down through the interior ofchill string 114, through orifices in drill bit 117, back to the surfacevia the annulus around drill string 114, and into a retention pit 122.The drilling fluid transports cuttings from the wellbore 118 into thepit 122 and aids in maintaining the integrity of the wellbore 118.Various materials can be used for drilling fluid, including oil-basedfluids and water-based fluids. As the cuttings from drilling areportions of the formation, they may be used as samples for scanning andimaging as disclosed herein.

As depicted in FIG. 1A, logging tools 124 are integrated into a bottomhole assembly 123 near the drill bit 117. As the drill bit 117 extendsthe wellbore 118 through the formations 119, logging tools 124 collectmeasurements relating to various formation properties as well as theorientation of the tool and various other drilling conditions. Thebottom hole assembly 123 can include one or more logging tools 124. Inat least one embodiment, one of the logging tools 124 of the bottom holeassembly 123 may include a measurement device as described herein. Thelogging tools 124 may be used for imaging or otherwise scanning, ormeasuring the formation 119 for producing the images as disclosed hereinfor use with geometric feature detection and machine learning processes.The bottom hole assembly 123 may also include a telemetry sub 125 totransfer measurement data to a surface receiver 126 and to receivecommands from the surface. In some embodiments, the telemetry sub 125communicates with a surface receiver 126 using mud pulse telemetry. Inother cases, the telemetry sub 125 does not communicate with thesurface, but rather stores logging data for later retrieval at thesurface when the logging assembly is recovered. Notably, one or more ofthe bottom hole assembly 123, the logging tools 124, and the telemetrysub 125 may also operate using a non-conductive cable (e.g. slickline,etc.) with a local power supply, such as batteries and the like. Whenemploying non-conductive cable, communication may be supported using,for example, wireless protocols (e.g. electromagnetic (EM), acoustic,etc.) and/or measurements and logging data may be stored in local memoryfor subsequent retrieval at the surface, as is appreciated by those inthe art. Each of the logging tools 124 may include a plurality of toolcomponents, spaced apart from each other, and communicatively coupledwith one or more wires. The telemetry sub 125 may include wirelesstelemetry or logging capabilities, or both, such as to transmit or laterprovide information indicative of received logging data to operators onthe surface or for later access and data processing for the evaluationof fluid within the wellbore. The logging tools 124 may also include oneor more computing devices 127 communicatively coupled with one or moreof the plurality of tool components. The computing device 127 may beconfigured to control or monitor the performance of the tools 124,process logging data, and/or carry out the methods of the presentdisclosure.

In some embodiments, one or more of the logging tools 124 maycommunicate with a surface receiver 126, such as via a wired drillpipe.In other cases, the one or more of the logging tools 124 may communicatewith a surface receiver 126 by wireless signal transmission. In at leastsome cases, one or more of the logging tools 124 may receive electricalpower from a wire that extends to the surface, including wires extendingthrough a wired drillpipe. In at least some instances, the methods andtechniques of the present disclosure may be performed by a computingdevice (not shown) on the surface. In some embodiments, the computingdevice may be included in surface receiver 126. For example, surfacereceiver 126 of wellbore operating environment 110 at the surface mayinclude one or more of wireless telemetry, processor circuitry, ormemory facilities, such as to support substantially real-time processingof data received from one or more of the logging tools 124. In someembodiments, data is processed at some time subsequent to itscollection, wherein the data may be stored on the surface at surfacereceiver 126, stored downhole in telemetry sub 125, or both, until it isretrieved for processing.

While FIG. 1A indicates that the wellbore is in the drilling stage, themethods and systems as described herein can be used at any pointthroughout the life of a wellbore. One example of such environment isshown in FIG. 1B.

FIG. 1B illustrates a schematic view of a conveyance wellbore operatingsystem 130 in which the present disclosure may be implemented. Asdepicted in FIG. 1B, a hoist 133 may be included as a portion of aplatform 131 coupled to a derrick 132, and used with a conveyance 137 toraise or lower equipment such as a wireline tool 134 into or out of aborehole surrounded by a geologic formation 136. The conveyance 137 mayprovide a communicative coupling between the wireline tool 134 and acontrol or processing facility 139 at the surface. The conveyance 137may include wirelines (e.g., one or more wires), slicklines, cables, orthe like, as well as tubular conveyances such as coiled tubing, jointtubing, or other tubulars, and may include a downhole tractor.Additionally, power can be supplied via the conveyance 137 to meet powerrequirements of the tool. The wireline tool 134 may have a local powersupply, such as batteries, a downhole generator, and the like. Whenemploying non-conductive cable, coiled tubing, pipe string, or adownhole tractor, communication may be supported using, for example,wireless protocols (e.g. EM, acoustic, etc.), and/or measurements andlogging data may be stored in local memory for subsequent retrieval. Inat least one embodiment, the wireline tool 134 may be operable tocollect samples of the geologic formations throughout the wellbore. Forexample, core samples may be taken from various formations adjacent thewellbore as the wireline tool 134 moves throughout the length of thewellbore. The control or processing facility 139 may include a computingdevice 138 capable of carrying out the methods and techniques of thepresent disclosure, including collecting and analyzing data gathered bythe wireline tool 134. In this manner, information about the rockformations adjacent the wellbore may be obtained by the analysis ofgeologic samples collected by the wireline tool 134 and processed by acomputing device, such as computing device 138. In some embodiments, thecomputing device 138 is equipped to process the received information insubstantially real-time, while in some embodiments, the computing device138 may be equipped to store the received information for processing atsome subsequent time. The computing device 138 can be a computing systemas described in more detail with respect to FIG. 1C.

FIG. 1C illustrates a system 1 for retrieving core samples from ageologic formation for integrated 2D or 3D image analysis. A wellbore 10is shown penetrating the geologic formation 12, which may have an uppersurface 13. The wellbore 10 can be drilled before formation evaluationtools are lowered into the wellbore 10. The system 1 may include a rig20 directly on an earth surface 13 and a downhole tool 5 may be conveyedinto and out of the wellbore 10 via a conveyance 16. As described abovewith respect to FIG. 1B, the conveyance may be any suitable means oflowering a tool 5 downhole. A measurement tool 14 and a core samplecollection tool 15 may be coupled via a joint 7 and positioned in avertically stacked formation. The measurement tool 14 may be used toanalyze the formation 12 within the wellbore 10, additionally themeasurement tool 14 may notate the location within the wellbore wheresamples are collected via the core sample collection tool 15. Coresamples and other formation samples obtained via the core samplecollection tool 15 may be received uphole at a location 15A and providedfor 2D or 3D image analysis.

In at least one example, the conveyance 16 may include conductors whichcan provide power and can be used to send control signals and databetween the tools and an electronic control system 24. The electroniccontrol system may include a control processor 24A operatively connectedwith the tool string 5. Logging tool and sample collection operationsforming parts of the methods and systems disclosed herein can beembodied in a computer program that runs in the processor 24A. Inoperation, the program may be coupled to receive data, for example, fromthe downhole tools, via the conveyance 16, and to transmit controlsignals to operative elements of the tool string 5. The computer programmay be stored on a computer-readable storage medium 24B (e.g. a harddisk) associated with the processor 24A, or may be stored on an externalcomputer-readable storage medium 26 or other recorder and electronicallycoupled to the processor 24A for use as needed. The storage medium 26may be any one or more of presently known storage media, such as amagnetic disk fitting into a disk drive, or an optically readableCD-ROM, or a readable device of any other kind, including a remotestorage device coupled over a switched telecommunication link, or futurestorage media suitable for the purposes and objectives described herein.For example, the logging data stored at the storage medium 24B orexternal storage medium 26 may be transferred to one or more computers27 having program instructions for carrying out further analysis of thelogging data, 2D or 3D image analysis, and/or subsequent integratedformation classification as described herein. The control system 24, theexternal storage medium 26, and computer 27 may be connected to eachother for communications (e.g., data transfer, etc.), via hardwire,radio frequency communications, telecommunications, internet connection,and/or other communication means. Further, the data and other loggingrelated information collected at the control system 24 and/or storagemedium 26 may be visually displayed on a monitor, log chart, or othervisual means of display 30 at the site and/or offsite. The tool data andany initial interpretation information thereon may be communicated, forexample, via satellite or land lines (not shown) to an offsite or remotelocation for further analysis relevant to logging information orformation characterization, including other interpretation software incombination with 2D or 3D image data obtained from samples collected inthe same well interval of the well bore.

Geological formation samples 17, such as core samples or other types offormation samples removed from the formation 12 using core sampleretrieval tool 15 can be transported to a CT or scanning electronmicroscope (SEM) scanner 19. The CT scanner or SEM scanner may useX-rays for analysis of internal structure of the samples, for generationof three dimensional (3D) images 21 of the geologic formation samplesretrieved from the formation. The images so generated may be presentedin numerical form as one or more data sets. After scanning, the samplesmay be saved for further analysis or may be discarded. In general, theinstrument used to scan the geologic formation samples 17, or othertypes of retrieved samples from the formation (e.g., core samples,percussion samples, cuttings, etc.), may be selected based on the sizeof the pores in the rock and what resolution is needed to produce ausable image. In the present example, the 2D or 3D image output (images)21 generated by the CT scanner 19 may be transferred to a computer 27having program instructions for carrying out the indicated geologicformation analysis to provide results 29 (e.g., pore/grainclassification), described in greater detail below.

Modifications, additions, or omissions may be made to FIGS. 1A-1Cwithout departing from the scope of the present disclosure. For example,FIGS. 1A-1C depict components of the wellbore operating environments ina particular configuration. However, any suitable configuration ofcomponents may be used. Furthermore, fewer components or additionalcomponents beyond those illustrated may be included in the wellboreoperating environment without departing from the scope of the presentdisclosure. It should be noted that while FIGS. 1A-1C generally depict aland-based operation, those skilled in the art would readily recognizethat the principles described herein are equally applicable tooperations that employ floating or sea-based platforms and rigs orsubsea, without departing from the scope of the present disclosure.Also, even though FIGS. 1A-1C depict a vertical wellbore, the presentdisclosure is equally well-suited for use in wellbores having otherorientations, including horizontal wellbores, slanted wellbores,multilateral wellbores, or the like.

The methods described herein can use machine learning methods in orderto provide a more accurate classification of downhole rock formations.For example, the present disclosure relates to a method for removinggeologic formation samples from various locations throughout the lengthof a wellbore. The physical location of each geologic formation samplemay be noted and recorded such that the data obtained from an analysisof the sample is correlated to a specific location within the wellbore.

The geologic formation sample may then be scanned using an X-ray, a CTscanner, an image sensor, or the like to provide a representative imageof the geologic formation sample that can then be further analyzed todetermine the appropriate pore and/or grain classifications andassociated rock type for that location. FIG. 3 is an illustration of animage 300 of a geologic formation sample taken, for example, by a CTdevice. In at least one example, the image can be a CT scan of a coresample obtained from a wellbore. In an alternative example, the imagecan be an image of any geologic sample for which a classification isdesired. In at least one example, as the image is created, data relatingto the location of the geologic formation within a wellbore or geologicformation is also cataloged. Therefore, after the detailed analysis isperformed the classified geologic formation can be traced to a specificlocation within the geologic formation.

The use of CT herein is only one exemplary imaging technique, as anyimaging technique maybe used including any X-ray imaging, magneticresonance imaging (MRI), scanning electron microscopy (SEM), electricalimaging, resistivity, optical imaging, and acoustical imaging. Imagingas disclosed herein may include a two-dimensional imaging (such aswhite-lite, UV-light, X-Ray projection, or thin section photography andthe like), a three dimensional imaging (such as a CT, SEM, MRI, or anyother method or device suitable for evaluating 2-D or 3-D distributionof a property within the sample.

FIG. 2 is a process flow diagram illustrating a method 200 in accordancewith the present disclosure. The method may be performed by the controlprocessor 24A and/or computer(s) 27 of FIG. 1C. The method 200 is forclassifying pore bodies or objects (e.g., grains) in a formation samplefrom a subterranean formation. In embodiments where the method 200 isused to classify pores (as opposed to grains), the classifications fordifferent pore bodies may include, for example, an indication of howmuch organic matter is deposited in the pores. These pore typeclassifications may include, for example, primary organic matter,secondary organic matter, or no organic matter.

The method 200 begins at block 202 with the acquisition of one or more2D images or 3D volumes. In particular, the method 200 may includereceiving, as a processor, a digital image representation of a formationsample. In some embodiments, the received digital image representation(block 202) may include a 2D image of a slice or thin section of theformation sample. FIG. 3 illustrates an example 2D image 300 of aformation sample in accordance with the present disclosure. In someembodiments, the received digital image representation (block 202) mayinclude a 3D volume representing a volume of the formation sample. FIG.4 illustrates an example 3D volume 400 of a formation sample inaccordance with the present disclosure. A 3D volume 400 imagerepresentation of the formation sample may be digitally constructed froma plurality of segmented 2D images taken of different portions of the 3Dvolume.

The digital image representation (block 202) may be received at theprocessor from a computer tomographic (CT) scanner (e.g., 19 of FIG. 1C)used to scan the formation sample from the subterranean formation. Thedigital image representation (block 202) may be received at theprocessor from a regular or micro-CT scanner, or any other type ofscanning equipment (e.g., SEM, X-ray imaging, MRI, electrical imaging,resistivity, optical imaging, and acoustical imaging, and the like)capable of generating one or more images from inside of a rock. Thedigital image representation (block 202) may be recently acquired fromthe CT scanner or other imaging device in some embodiments. In otherembodiments, the digital image representation (block 202) may have beenacquired previously from the CT scanner or other imaging device andstored in a storage device (e.g., storage medium 24B or external storagemedium 26 of FIG. 1C) for access and use via the method 200. Forexample, the digital image representation (block 202) may have beenacquired throughout a long period of time, such as years, and stored ina storage device to be used by the method 200.

In the method 200, the digital image representation (block 202)represents the main input to the method 200. That is, the digital imagerepresentation (block 202) input to the processor is regarded as thedata intended to be used for classification of pore or grain types inthe image/volume. Thus, the classification of pore or grain types in thedigital image representation is the end step (e.g., block 218) of themethod 200 and target goal of the method 200.

In addition to the digital image representation (block 202), the method200 may also leverage one or more types of manual data, if it isavailable. The method 200 may include determining whether manual data isavailable, at block 204. Such manual data may include, for example,manual features (block 206), manual labels (block 208), or a combinationthereof. As discussed below, the manual data may function as one or moretraining sets for the machine learning processes in later steps of themethod 200.

The manual features (block 206) may comprise one or more geometricfeatures, such as geometric properties of pores, grains, or both indigital image representations of one or more formation samples, ascalculated by a geologist, other skilled person, or a computer. In anexample, these calculation(s) may be performed as physical experimentsusing real rock in a laboratory, using or not using a computer. Inanother example, the calculation(s) of manual features (block 206) maybe performed digitally using a digital image representation of a rock.The manual features (block 206) may have been previously calculated viaone or more of the above approaches prior to receiving the digital imagerepresentation (block 202) at the processor for performing the presentmethod 200. As such, the manual features (block 206) may be considered“past data” features. The past data features are regarded as the featuredata acquired in the past that may or may not be used in the method 200to classify pore or grain types. The manual features (block 206) may beused only for the sole purpose of training the machine-learning models.

The manual labels (block 208) may comprises one or more labels, such aspore types, sub-types or super-types, grain types, sub-types orsuper-types, or a combination thereof, as labeled by a geologist, otherskilled person, or a computer. In an example, these labels may beapplied to a real rock, not using a computer. In another example, thelabels may be applied using a computer to a digital image representationof a rock. The manual labels (block 208) that may be input to the method200 may include, for example, one or more labeled SEM 2D images. Themanual labels (block 208) may have been previously applied to real ordigital rock sample(s) via one or more of the above approaches prior toreceiving the digital image representation (block 202) at the processorfor performing the present method 200. As such, the manual labels (block208) may be considered “past data” labels. The past data labels areregarded as the labels acquired in the past that may or may not be usedin the method 200 to classify pore or grain types. The manual labels(block 208) may be used only for the sole purpose of training amachine-learning model.

Regardless of whether any manual data is available (block 204), themethod 200 next proceeds to block 210. At block 210, the method 200 mayinclude identifying a plurality of pores, grains, or both in the digitalimage representation of the formation sample. The plurality of pores,grains, or both may be those pores, grains, or both which are visible inthe 2D image or 3D volume. The digital image representation may take theform of at least one data set. As such, block 202 may include receivingat least one data set providing the digital image representation. Insome embodiments, identifying the plurality of pores, grains, or both(block 210) in the digital image representation may include analyzingthe at least one data set via the processor to identify the plurality ofpores, grains, or both in the digital image representation. Thisanalysis may include any desired image processing techniques such asfiltering the data set to identify groups of pixels in the image thatrepresent pores and/or grains or pore/grain boundaries.

In other embodiments, identifying the plurality of pores, grains, orboth (block 210) in the digital image representation may includereceiving, via the processor, a user selection of the plurality ofpores, grains, or both in the digital image representation. For example,the processor may display a 2D image or 3D volume on a display (e.g.,display 30 of FIG. 1C) and then receive the user selection of theplurality of pores, grains, or both via an input device such as a mouse,keyboard, or the display itself (e.g., a touchscreen). Other techniquesmay be used to provide a user selection of the pores, grains, or both tothe processor. In still other embodiments, a combination of automatedimage data set analysis and user selection techniques may be used toidentify the plurality of pores, grains, or both (block 210) in thedigital image representation.

The method 200 may next include computing (block 211), via theprocessor, a plurality of geometric features associated with theplurality of pores, grains, or both in the digital image representationof the formation sample. From the CT or other imaging data (block 202),the processor computes (block 211) features (e.g., rock properties) thatmay consist of geometric image-based or volume-based properties. Thesegeometric features may be computed (block 211) using well-establishedcalculations in the field of geology.

FIG. 5 illustrates an example pore 500 identified in a digital imagerepresentation, along with examples of several geometric features thatmay be computed at block 211 of the method 200. These geometric featuresmay include, for example, a length 502 of the pore 500, a width 504 ofthe pore 500, and the Feret's diameter 506 of the pore 500. The Feret'sdiameter 506 is a longest dimension in the pore/grain size. The pore 500in FIG. 5 is represented by its boundary 508, a thick black line, wherea number of pixels 510 (in the case of a 2D thin section image) orvoxels (in the case of a 3D volume) are inside the boundary 508 andconstitute one image-based property or volume-based property. Severalother geometric features exist and may also be computed (step 211 ofFIG. 2 ). For example, the pore size distribution (or grain sizedistribution) may be computed. In an example, pore size distribution mayrefer to frequency and cumulative distributions of pore sizes computedas a ratio of the volume to surface of individual segmented pores in the3D volume. In another example, pore size distribution may include ahydraulic pore size distribution based on an openness of the pore space.Hydraulic pore size distribution may be based on an opening map of thepore space in which every pore voxel has a value equal to the radius ofthe largest sphere that can be inscribed in the pore space withoutintersecting a solid voxel. Grain size distribution refers to therelative amounts of grains of certain sizes present within the 3Dvolume, which may be determined using similar measurements for solidregions in the 3D volume as opposed to openings The mean, standarddeviation, median, and mode of the pore (or grain) size distribution maythen be used to derive the skewness and kurtosis of the pores (orgrains). Other separate calculations may be used to compute sphericity,flatness, roundness, and/or imbrication of the pores (or grains).

As such, the plurality of geometric features may include, for example,one or more features such as length, width, area, area fraction (i.e.,fraction between the area of the pore/grain and the area of the image),Feret's diameter, Feret's shape, a number of pixels or voxels inside theidentified pore or grain, sum of the voxel surfaces on the outside ofeach connected component, a number of pixels or voxels in the pore/grainlocated along a boundary of the image, a shortest edge to edge distancefrom the pore or grain to its nearest neighbor, a number of holestherein, circle differential area (i.e., difference between the area ofthe pore or grain and an area of a smoothing circle or an enclosingcircle thereof), location of the center of gravity, moment of inertia,equivalent circular diameter, equivalent spherical diameter, pore orgrain size distribution, skewness, kurtosis, sphericity, flatness,roundness, imbrication, curvature, anisotropy, uniformity, homogeneity,Crofton perimeter, elongation, eccentricity, variance, inside length,orientation, perimeter, rugosity, Shape factor, symmetry, volume,breadth, and connectedness.

These geometric features are merely examples of many properties that maybe computed on the pores (or grains), and they correspond to pore (orgrain) characterization and morphology. In addition, for certain rocks,the pores may be replaced by grains and the same characterization andmorphology apply, such that the pores or grains in the context of thepresent disclosure are interchangeable. In some embodiments, forreference a standard scale unit 512, such as 1 Phi, may be used insteadof pixels 510 or voxels to compute the various geometric features.

Turning back to FIG. 2 , at block 213 the method 200 includes inputtingthe plurality of geometric features computed at block 211 into anunsupervised machine learning model. In embodiments where manual dataindicating geometric features (block 206) is available, the method 200includes receiving, at the processor, the manual data indicating thegeometric features (block 206), and inputting at block 213 the manualdata indicating geometric features (block 206) into the unsupervisedmachine learning model along with the plurality of geometric features(block 211) computed by the processor. For example, after the geometricfeatures for the digital image representation (block 202) are computedat block 211, the geometric features may be merged with the pre-existingmanual features (block 206) to form a database of features (block 212)of pores or grains to be used by the unsupervised machine learningmodel. In embodiments where no manual geometric features are available,the geometric features computed at block 211 are provided alone in adatabase of features (block 212) of the pores and/or grains identifiedin the digital image representation.

Prior to inputting the geometric features into the unsupervised model(block 213), the processor may further prepare or condition the databaseof geometric features (block 212). For example, the method 200 mayinclude preparing the at least one data set by filtering out pore orgrain samples having less than a certain number of pixels (e.g., <20pixels in area) or voxels, checking for empty cells in the featuredatabase, discarding repetitive portions (e.g., repeated columns) of thefeature database, discarding highly correlated columns in the featuredatabase, converting the database into a group of arrays for entry intothe unsupervised machine learning model (block 213), and/or storing allcolumn names of the feature database as feature names. The resultinggeometric features may be input to the unsupervised machine learningmodel as a group of arrays, where each array is a list of geometricfeatures associated with a different pore and/grain in the digital imagerepresentation.

In accordance with the present disclosure, the first machine learningmodel that may be trained by the method 200 is an unsupervised model(block 213). The unsupervised machine learning model (block 213) usesonly the geometric features (block 212) as input. At block 214, themethod 200 includes determining, using the unsupervised machine learningmodel, a label for each identified pore and each identified grain fromthe digital image representation (block 202). The labels at block 214may represent a pore-type for each pore and a grain-type for each grainidentified at block 210. Determining the labels (block 214) may includeclustering each of the identified pores and/or grains in a feature spacevia the unsupervised machine learning model. The feature space is amulti-dimensional space where each dimension corresponds to one of theplurality of features in the feature database of block 212. Theunsupervised machine learning model may cluster the data representingdifferent pores and/or grains within the multi-dimensional feature spaceand, in some embodiments, reduce the dimensionality of the data set(e.g., number of parameters that may be used to plot the data set).Block 214 of the method 200 may further include assigning labels to thepores and/or grains clustered in one or more regions within the featurespace (or reduced parameter space), where each label corresponds to aseparate region within the feature space. The unsupervised machinelearning model may generate its own labels (block 214), each labelrepresenting a separated region within the feature space (or reducedparameter space) learned by the model. As discussed above, theunsupervised machine learning model may be used with pre-existing pastfeature data or with just the features computed at block 211.

The unsupervised machine learning model used to generate the labels(block 214) may be any desired type of unsupervised machine learningmodel used for clustering data including, but not limited to, a GaussianMixture Model (GMM), a symbolic regression, xGBoost, and the like. Theunsupervised machine learning model may be trained using the past data(e.g., features 206) as training data. The unsupervised machine learningmodel may output unique labels learned for the different pores and/orgrains included in the input feature database 212. In some embodiments,the unsupervised machine learning model may also output an indication ofthe accuracy of the model, one or more clustering model properties, andother information.

At block 216, the method 200 includes inputting the plurality ofgeometric features (block 212) and the labels (block 214) for each ofthe identified pores, grains, or both, into a supervised machinelearning model. In embodiments where manual data indicating labels(block 208) is available, the method 200 includes receiving, at theprocessor, the manual data indicating the labels (block 208), andinputting at block 216 the manual data indicating labels (block 208)into the supervised machine learning model along with the plurality ofgeometric features (block 212) and labels (block 214) determined by theunsupervised model. For example, after the initial labels for thedigital image representation (block 202) are determined by theunsupervised model at block 214, the labels (block 214) may be mergedwith the pre-existing manual labels (block 208) to form a database oflabels of pores or grains to be used by the second machine learningmodel. In some embodiments, merging the manual data indicating labels(block 208) with the labels determined at block 214 may be performedbased on input from a user. That is, the merge may be done manually by ageologist or other skilled user, for example. In other embodiments,merging the manual data indicating labels (block 208) with the labelsdetermined at block 214 may be performed automatically via the processorusing a best fit correlation analysis. For example, the processor mayuse the best fit between label sets (208 and 214) using mutualinformation correlation between the label sets. In embodiments where nomanual labels are available, the labels determined at block 214 areprovided in a database of labels of the pores and/or grains identifiedin the digital image representation.

In accordance with the present disclosure, the second machine learningmodel that may be trained by the method 200 is a supervised model (block216). The supervised machine learning model (block 216) uses both thegeometric features (block 212) and the database of labels (208 and/or214) as input. This is the final machine learning model in the method200 to classify pore or grain types.

At block 218, the method 200 includes determining, using the supervisedmachine learning model, a final classification of a pore-type for eachidentified pore and a grain-type for each identified grain in thedigital image representation (block 202) of the formation sample. Thefinal classification at block 218 is a pore-type for each pore and agrain-type for each grain identified at block 210. Determining the finalclassification (block 218) may include, for example, using a targetvector comprising the labels 214 provided by the unsupervised clusteringmachine learning model, and standardizing (e.g., z-scoring) the inputfeatures (block 212) to be in the classification model. The labels 214are then correlated with the training set of labels 208 based on theirassociated geometric features 212. The supervised machine learning modelmay output the final classification (block 218) of pore-types and/orgrain-types, which provide meaningful geologic information. The finalclassification of pore-types may include one or more pore-types selectedfrom the following: intercrystalline, interparticle, intraparticle,fenestral, shelter, growth framework, moldic, fracture, channel, vug,cavern, micro porosity, meso porosity, macro porosity, porosityassociated with organic matter, clay bound pores, effective porosity,mobilized secondary organic matter pore. The final classification ofgrains in clastic reservoirs includes at least one of grain size, grainsorting, grain size skewness and kurtosis, grain angularity, grainsphericity/elongation and fabric to evaluate reservoir quality. Thefinal classification of grains may include one or more features selectedfrom the following: grain size as defined by the modifiedUdden-Wentworth grain size chart (e.g., gravel, sand, silt, clay), grainsorting by (phi) units as defined by Folk and Ward (1957) (e.g., verywell sorted, well sorted, moderately sorted, poorly sorted, and verypoorly sorted), grain angularity (e.g., angular, subangular, subroundedto rounded), and fabric as defined by either Dunham (1962) (e.g.,mudstone, wackestone, packstone, grainstone, boundstone, crystallinecarbonate), Embry and Klovan (1971) (e.g., floatstone, rudstone,bafflestone, bindstone, framestone), or Folk (1959) (e.g., micrite,fossiliferous biomicrite, sparse biomicrite, packed biomicrite, poorlywashed iosparite, unsorted biosparite, sorted biosparite, roundedbisparite). For the pores the classification by Choquette and Pray(1970) and later authors describe a variety of pore types:intercrystalline, interparticle, intraparticle, fenestral, shelter,growth framework, moldic, fracture, channel, vug, cavern, microporosity, meso porosity, macro porosity, porosity associated withorganic matter, clay bound pores, effective porosity, and mobilizedsecondary organic matter pore, etc.

In some embodiments, the computed geometric features (block 212) anddetermined final classifications (block 218) of pore-types/grain-typesmay be fed back into the method 200 as manual features (block 206) andmanual labels (block 208), respectively, for classification of a newformation sample. In some embodiments, the method 200 may be repeated inthis manner for several iterations to classify thepore-types/grain-types of multiple formation samples from the sameformation, each time with a larger manual set of geometric features(206) and labels (208) to train the machine learning models. The method200, with the reduction in dimensionality of the unsupervised machinelearning model and the regression analysis of the supervised machinelearning model, may be iterated until the supervised machine learningmodel outputs classification results with a high enough R squared toeffectively characterize the subterranean formation.

The disclosed method 200 provides classification of pore or grain typeswith higher accuracy and far greater speed than would be possible by ageologist examining and manually labelling rock samples. Even though thelabelling of pore/grain types in rock samples follows long establishedclassification schemes, it can be difficult to detect patterns in thegeometry of the formation samples. In addition, since the manualclassification of pore/grain types is ultimately a subjective process,different geologists may assign different classifications to the sameformation samples. The present disclosure uses machine learningtechniques to take the guesswork out of the process of classifyingpore-types or grain-types in a formation sample. The disclosed systemsand methods enable the easy, fast, and accurate classification of poretypes (e.g., intercrystalline) that are known to be desirable for oiland gas production, so that decisions can be made regarding where toproceed with drilling and completion of wells. Since the process isautomated and may be performed via a non-transitory computer-readablemedium, formations can be classified and decisions regarding where todrill or complete wells can be made in days, as opposed to months oryears as is typical with existing manual techniques. In addition, theautomated systems and methods may provide this classification data for asubterranean formation in a large and quantifiably related fashion,without inconsistencies between multiple geologists.

In some embodiments, at block 220, the method 200 may include renderingfor display, on a display, the digital image representation of theformation sample superimposed with one or more visual labelscorresponding to the final classification of the pore-type for each poreand grain-type for each grain. An example of one such display is providein FIG. 6 . As illustrated, the digital image 600 includes two differentvisual labels 602 and 604 (illustrated as different textures) located atdifferent pore locations throughout the digital image 600. In theillustrated embodiment, the label 602 represents primary organic matter,while the label 604 represents secondary (mobile) organic matter.

The disclosed systems and methods use apparently unrelated techniquesand data to provide pore-type and grain-type classificationsautomatically. Namely, the disclosed method involves the computation ofvarious properties (features) related to pore (or grain) shape geometry,leveraging existing data with manual labels of pore types and thecalculation of additional features, and training machine-learning modelsusing all available features and labels in unsupervised and supervisedmanners. The disclosed systems and methods may increase the quality ofservices delivered via digital rock analysis software used to analyzerock images as 2D thin sections or 3D volumes generated by imaging core,plug, or subsamples of a formation.

One or more aspects of the present disclosure provide a method. Themethod includes receiving, at a processor, a digital imagerepresentation of a formation sample. The method further includesidentifying a plurality of pores, grains, or both in the digital imagerepresentation of the formation sample. The method further includescomputing, via the processor, a plurality of geometric featuresassociated with the plurality of pores, grains, or both in the digitalimage representation of the formation sample. The method furtherincludes inputting the plurality of geometric features into anunsupervised machine learning model. The method further includesdetermining, using the unsupervised machine learning model, a label foreach identified pore and each identified grain, wherein the labelcomprises a pore-type for the pore or a grain-type for the grain. Themethod further includes inputting the plurality of geometric featuresand the labels determined for each of the identified pores, grains, orboth, into a supervised machine learning model. The method furtherincludes determining, using the supervised machine learning model, afinal classification of a pore-type for each pore and a grain-type foreach grain identified in the digital image representation of theformation sample.

In one or more aspects, the method further includes: receiving, at theprocessor, manual data indicating geometric features associated withpores, grains, or both in digital image representations of one or moreother formation samples, the manual data having been previouslydetermined by a geologist, and inputting the manual data indicatinggeometric features into the unsupervised machine learning model alongwith the plurality of geometric features computed by the processor.

In one or more aspects, the method further includes: receiving, at theprocessor, manual data indicating labels for pores, grains, or both indigital image representations of one or more other formation samples,the manual data having been previously determined by a geologist, andinputting the manual data indicating labels into the supervised machinelearning model along with the plurality of geometric features and thelabels determined for each of the identified pores, grains, or both.

In one or more aspects, the method further includes: clustering each ofthe identified pores and/or grains in a feature space via theunsupervised machine learning model, the feature space being amulti-dimensional space where each dimension corresponds to one of theplurality of features, and assigning labels to the pores and/or grainsclustered in one or more regions within the feature space, wherein eachlabel corresponds to a separate region within the feature space.

In one or more aspects, the method further includes: receiving thedigital image representation of the formation sample comprises receivingat least one data set, and identifying the plurality of pores, grains,or both comprises analyzing the data set via the processor to identifythe plurality of pores, grains, or both in the digital imagerepresentation.

In one or more aspects, identifying the plurality of pores, grains, orboth includes receiving, via the processor, a user selection of theplurality of pores, grains, or both in the digital image representation.

In one or more aspects, the plurality of geometric features include oneor more features selected from the list consisting of: wherein theplurality of geometric features comprise one or more features selectedfrom the list consisting of: length, width, area, area fraction, Feret'sdiameter, Feret's shape, number of pixels or voxels inside theidentified pore or grain, sum of the voxel surfaces on the outside ofeach connected component, number of pixels or voxels in the pore/grainlocated along a boundary of the image, shortest edge to edge distancefrom the pore or grain to its nearest neighbor, number of holes therein,circle differential area, location of center of gravity, moment ofinertia, equivalent circular diameter, equivalent spherical diameter,pore or grain size distribution, skewness, kurtosis, sphericity,flatness, roundness, imbrication, curvature, anisotropy, uniformity,homogeneity, Crofton perimeter, elongation, eccentricity, variance,inside length, orientation, perimeter, rugosity, Shape factor, symmetry,volume, breadth, and connectedness.

In one or more aspects, the label for each identified pore comprises apore-type selected from the group consisting of: intercrystalline,interparticle, intraparticle, fenestral, shelter, growth framework,moldic, fracture, channel, vug, cavern, micro porosity, meso porosity,macro porosity, porosity associated with organic matter, clay boundpores, effective porosity, and mobilized secondary organic matter pore.

In one or more aspects, the label for each identified grain comprises atleast one of a grain size, a grain sorting by phi units, grainangularity, and fabric.

In one or more aspects, the digital image representation includes a 2Dimage of a slice of the formation sample.

In one or more aspects, the digital image representation includes a 3Dvolume representing a volume of the formation sample.

In one or more aspects, the method further includes rendering fordisplay, on a display, the digital image representation of the formationsample superimposed with one or more visual labels corresponding to thefinal classification of the pore-type for each pore and grain-type foreach grain.

In one or more aspects, receiving the digital image representationincludes receiving the digital image representation of the formationsample from a computer tomographic (CT) scanner used to scan theformation sample from the subterranean formation.

In one or more aspects, the method further includes merging the manualdata indicating labels with the labels determined for each of theidentified pores, grains, or both based on input from a user.

In one or more aspects, the method further includes merging the manualdata indicating labels with the labels determined for each of theidentified pores, grains, or both via the processor using a best fitcorrelation analysis.

In one or more aspects, receiving the digital image representationincludes receiving the digital image representation of the formationsample from a storage medium storing past scans of one or more formationsamples.

One or more aspects of the present disclosure also provide a system forclassifying pores, grains, or both in a formation sample. The systemincludes a non-transitory storage medium and at least one processorcoupled to the non-transitory storage medium. The at least one processorexecutes one or more instructions stored on the non-transitory storagemedium to: receive a digital image representation of a formation sample;identify a plurality of pores, grains, or both in the digital imagerepresentation of the formation sample; compute a plurality of geometricfeatures associated with the plurality of pores, grains, or both in thedigital image representation of the formation sample; input theplurality of geometric features into an unsupervised machine learningmodel; determine, using the unsupervised machine learning model, a labelfor each identified pore and each identified grain, wherein the labelcomprises a pore-type for the pore or a grain-type for the grain; inputthe plurality of geometric features and the labels determined for eachof the identified pores, grains, or both, into a supervised machinelearning model; and determine, using the supervised machine learningmodel, a final classification of a pore-type for each pore and agrain-type for each grain identified in the digital image representationof the formation sample. In one or more aspects, the system furtherincludes a computer tomographic (CT) scanner communicatively coupled tothe at least one processor, wherein the at least one processor receivesthe digital image representation of a formation sample from the CTscanner.

In one or more aspects, the system further includes a displaycommunicatively coupled to the at least one processor, wherein the atleast one processor executes one or more instructions stored on thenon-transitory storage medium to: render, for display on the display,the digital image representation of the formation sample superimposedwith one or more visual labels corresponding to the final classificationof the pore-type for each pore and grain-type for each grain.

One or more aspects of the present disclosure also provide anon-transitory computer-readable medium storing one or more instructionsthat, when executed by at least one processor, cause the at least oneprocessor to perform one or more operations. The one or more operationsincludes: receiving a digital image representation of a formationsample; identifying a plurality of pores, grains, or both in the digitalimage representation of the formation sample; computing a plurality ofgeometric features associated with the plurality of pores, grains, orboth in the digital image representation of the formation sample;inputting the plurality of geometric features into an unsupervisedmachine learning model; determining, using the unsupervised machinelearning model, a label for each identified pore and each identifiedgrain, wherein the label comprises a pore-type for the pore or agrain-type for the grain; inputting the plurality of geometric featuresand the labels determined for each of the identified pores, grains, orboth, into a supervised machine learning model; and determining, usingthe supervised machine learning model, a final classification of apore-type for each pore and a grain-type for each grain identified inthe digital image representation of the formation sample.

In one or more aspects, the one or more operations further include:receiving manual data indicating geometric features associated withpores, grains, or both in digital image representations of one or moreother formation samples, the manual data having been previouslydetermined by a geologist; and inputting the manual data indicatinggeometric features into the unsupervised machine learning model alongwith the plurality of computed geometric features In one or moreaspects, the one or more operations further include: receiving manualdata indicating labels for pores, grains, or both in digital imagerepresentations of one or more other formation samples, the manual datahaving been previously determined by a geologist; and inputting themanual data indicating labels into the supervised machine learning modelalong with the plurality of geometric features and the labels determinedfor each of the identified pores, grains, or both.

Therefore, the present disclosure is well adapted to attain the ends andadvantages mentioned as well as those that are inherent therein. Theparticular aspects disclosed above are illustrative only, as the presentdisclosure may be modified and practiced in different but equivalentmanners apparent to those skilled in the art having the benefit of theteachings herein. Furthermore, no limitations are intended to thedetails of construction or design herein shown, other than as describedin the claims below. It is therefore evident that the particularillustrative aspects disclosed above may be altered or modified and allsuch variations are considered within the scope and spirit of thepresent disclosure. Also, the terms in the claims have their plain,ordinary meaning unless otherwise explicitly and clearly defined by thepatentee. The indefinite articles “a” or “an,” as used in the claims,are defined herein to mean one or more than one of the elements that itintroduces.

What is claimed is:
 1. A method, comprising: receiving, at a processor,a digital image representation of a formation sample; identifying aplurality of pores, grains, or both in the digital image representationof the formation sample; computing, via the processor, a plurality ofgeometric features associated with the plurality of pores, grains, orboth in the digital image representation of the formation sample;inputting the plurality of geometric features into an unsupervisedmachine learning model; determining, using the unsupervised machinelearning model, a label for each identified pore and each identifiedgrain, wherein the label comprises a pore-type for the pore or agrain-type for the grain; inputting the plurality of geometric featuresand the labels determined for each of the identified pores, grains, orboth, into a supervised machine learning model; and determining, usingthe supervised machine learning model, a final classification of apore-type for each pore and a grain-type for each grain identified inthe digital image representation of the formation sample.
 2. The methodof claim 1, further comprising: receiving, at the processor, manual dataindicating geometric features associated with pores, grains, or both indigital image representations of one or more other formation samples,the manual data having been previously determined by a geologist; andinputting the manual data indicating geometric features into theunsupervised machine learning model along with the plurality ofgeometric features computed by the processor.
 3. The method of claim 1,further comprising: receiving, at the processor, manual data indicatinglabels for pores, grains, or both in digital image representations ofone or more other formation samples, the manual data having beenpreviously determined by a geologist; and inputting the manual dataindicating labels into the supervised machine learning model along withthe plurality of geometric features and the labels determined for eachof the identified pores, grains, or both.
 4. The method of claim 1,further comprising: clustering each of the identified pores and/orgrains in a feature space via the unsupervised machine learning model,the feature space being a multi-dimensional space where each dimensioncorresponds to one of the plurality of features; and assigning labels tothe pores and/or grains clustered in one or more regions within thefeature space, wherein each label corresponds to a separate regionwithin the feature space.
 5. The method of claim 1, wherein: receivingthe digital image representation of the formation sample comprisesreceiving at least one data set; and identifying the plurality of pores,grains, or both comprises analyzing the data set via the processor toidentify the plurality of pores, grains, or both in the digital imagerepresentation.
 6. The method of claim 1, wherein identifying theplurality of pores, grains, or both comprises receiving, via theprocessor, a user selection of the plurality of pores, grains, or bothin the digital image representation.
 7. The method of claim 1, whereinthe plurality of geometric features comprise one or more featuresselected from the list consisting of: length, width, area, areafraction, Feret's diameter, Feret's shape, number of pixels or voxelsinside the identified pore or grain, sum of the voxel surfaces on theoutside of each connected component, number of pixels or voxels in thepore/grain located along a boundary of the image, shortest edge to edgedistance from the pore or grain to its nearest neighbor, number of holestherein, circle differential area, location of center of gravity, momentof inertia, equivalent circular diameter, equivalent spherical diameter,pore or grain size distribution, skewness, kurtosis, sphericity,flatness, roundness, imbrication, curvature, anisotropy, uniformity,homogeneity, Crofton perimeter, elongation, eccentricity, variance,inside length, orientation, perimeter, rugosity, Shape factor, symmetry,volume, breadth, and connectedness.
 8. The method of claim 1, whereinthe label for each identified pore comprises a pore-type selected fromthe group consisting of: intercrystalline, interparticle, intraparticle,fenestral, shelter, growth framework, moldic, fracture, channel, vug,cavern, micro porosity, meso porosity, macro porosity, porosityassociated with organic matter, clay bound pores, effective porosity,and mobilized secondary organic matter pore.
 9. The method of claim 1,wherein the label for each identified grain comprises at least one of agrain size, a grain sorting by phi units, skewness, kurtosis, grainangularity, grain sphericity and fabric.
 10. The method of claim 1,wherein the digital image representation comprises a 2D image of a sliceof the formation sample.
 11. The method of claim 1, wherein the digitalimage representation comprises a 3D volume representing a volume of theformation sample.
 12. The method of claim 1, further comprisingrendering for display, on a display, the digital image representation ofthe formation sample superimposed with one or more visual labelscorresponding to the final classification of the pore-type for each poreand grain-type for each grain.
 13. The method of claim 1, whereinreceiving the digital image representation comprises receiving thedigital image representation of the formation sample from a computertomographic (CT) scanner used to scan the formation sample from thesubterranean formation.
 14. The method of claim 1, wherein receiving thedigital image representation comprises receiving the digital imagerepresentation of the formation sample from a storage medium storingpast scans of one or more formation samples.
 15. A system forclassifying pores, grains, or both in a formation sample, the systemcomprising: a non-transitory storage medium; and at least one processorcoupled to the non-transitory storage medium, wherein the at least oneprocessor executes one or more instructions stored on the non-transitorystorage medium to: receive a digital image representation of a formationsample; identify a plurality of pores, grains, or both in the digitalimage representation of the formation sample; compute a plurality ofgeometric features associated with the plurality of pores, grains, orboth in the digital image representation of the formation sample; inputthe plurality of geometric features into an unsupervised machinelearning model; determine, using the unsupervised machine learningmodel, a label for each identified pore and each identified grain,wherein the label comprises a pore-type for the pore or a grain-type forthe grain; input the plurality of geometric features and the labelsdetermined for each of the identified pores, grains, or both, into asupervised machine learning model; and determine, using the supervisedmachine learning model, a final classification of a pore-type for eachpore and a grain-type for each grain identified in the digital imagerepresentation of the formation sample.
 16. The system of claim 15,further comprising a computer tomographic (CT) scanner communicativelycoupled to the at least one processor, wherein the at least oneprocessor receives the digital image representation of a formationsample from the CT scanner.
 17. The system of claim 15, furthercomprising a display communicatively coupled to the at least oneprocessor, wherein the at least one processor executes one or moreinstructions stored on the non-transitory storage medium to: render, fordisplay on the display, the digital image representation of theformation sample superimposed with one or more visual labelscorresponding to the final classification of the pore-type for each poreand grain-type for each grain.
 18. A non-transitory computer-readablemedium storing one or more instructions that, when executed by at leastone processor, cause the at least one processor to perform one or moreoperations comprising: receiving a digital image representation of aformation sample; identifying a plurality of pores, grains, or both inthe digital image representation of the formation sample; computing aplurality of geometric features associated with the plurality of pores,grains, or both in the digital image representation of the formationsample; inputting the plurality of geometric features into anunsupervised machine learning model; determining, using the unsupervisedmachine learning model, a label for each identified pore and eachidentified grain, wherein the label comprises a pore-type for the poreor a grain-type for the grain; inputting the plurality of geometricfeatures and the labels determined for each of the identified pores,grains, or both, into a supervised machine learning model; anddetermining, using the supervised machine learning model, a finalclassification of a pore-type for each pore and a grain-type for eachgrain identified in the digital image representation of the formationsample.
 19. The non-transitory computer-readable medium of claim 18,wherein the one or more operations further comprise: receiving manualdata indicating geometric features associated with pores, grains, orboth in digital image representations of one or more other formationsamples, the manual data having been previously determined by ageologist; and inputting the manual data indicating geometric featuresinto the unsupervised machine learning model along with the plurality ofcomputed geometric features.
 20. The non-transitory computer-readablemedium of claim 18, wherein the one or more operations further comprise:receiving manual data indicating labels for pores, grains, or both indigital image representations of one or more other formation samples,the manual data having been previously determined by a geologist; andinputting the manual data indicating labels into the supervised machinelearning model along with the plurality of geometric features and thelabels determined for each of the identified pores, grains, or both.